from flask import Flask 

app = Flask(__name__)

# api文档自动生成工具
from flasgger import Swagger
swagger = Swagger(app)

# 使用范例
@app.route('/hello/<name>', methods=['GET'])
def hello(name):
    """
    This is an example endpoint
    It takes a single parameter `name` and returns a greeting
    ---
    parameters:
      - in: path
        name: name
        type: string
        required: true
    responses:
      200:
        description: A greeting message
    """
    return f"Hello, {name}!"